﻿using System;

namespace IMDBServiceAPI
{
    /// <summary>
    /// Class that represents the exception thrown out
    /// when the retrieval of the information was not successful
    /// </summary>
    public class RetrievalFailureException : ApplicationException
    {
        /// <summary>
        /// Gets the title of the movie for which the retrieval was not successful
        /// </summary>
        public string MovieTitle { get; private set; }
        public RetrievalFailureException(string strMovieTitle) : base() { MovieTitle = strMovieTitle; }        
        public override string Message
        {
            get
            {
                return String.Format(
                    IMDBServiceConstants.FORMAT_EXCEPTION_MESSAGE,
                    MovieTitle);
            }
        }
    }
}
